import 'package:casdon/core/logger/log.dart';
import 'package:casdon/core/network/business_exception.dart';
import 'package:casdon/modules/feedback/data/api/feedback_type_enum_api.dart';
import 'package:casdon/modules/feedback/data/repository/feedback_repository.dart';

class FeedbackTypeListUsecase {
  final FeedbackRepository _repository;

  const FeedbackTypeListUsecase(this._repository);

  Future<List<ResponseFeedbackTypeEnum>> execute() async {
    try {
      final result = await _repository.getFeedbackTypeList();
      return result;
    } on BusinessException {
      rethrow;
    } catch (e, stack) {
      Log.e('FeedbackTypeListUsecase failed', e, stack);
      rethrow;
    }
  }
}

